﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JiHua_WLQD.aspx.cs" Inherits="syc.Produce.JiHua_WLQD" %>
<html>
<head>
</head>
<body>
<script type="text/javascript" language="javascript" src="/common.js"></script>

    <form id="form1" runat="server">
    <div id="wintop" class="wintop"><asp:Label ID="JiHuaMC" runat="server" Text=""></asp:Label> 物料清单</div>

    <asp:Panel ID="Panel1" runat="server" CssClass="panel">
        <asp:Button ID="Button_Export" runat="server" Text="导 出" CssClass="button" 
            UseSubmitBehavior="False" onclick="Button_Export_Click"/>
        <asp:Button ID="Button_Back" runat="server" Text="返 回" CssClass="button" 
            UseSubmitBehavior="False" onclick="Button_Back_Click" />


    </asp:Panel>

    <asp:Panel ID="Panel3" runat="server" CssClass="panel2">
        <asp:Label ID="Message" runat="server" Text="·请点击按钮“生成物料清单”" CssClass="prompt"></asp:Label>
    </asp:Panel>
        
    <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
	            <tr>
		            <td class="grid-title">生产计划所需物料清单</td>
		        </tr>
		        <tr>
		            <td class="grid-back">
                        <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CssClass="grid"  
                            DataSourceID="SqlDataSource2" 
                            GridLines="None"
                            AllowSorting="True" 
                            UseAccessibleHeader="False" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <Columns>
                                <asp:TemplateField HeaderText="物料" SortExpression="物料">
                                    <ItemTemplate>
                                        <asp:Label ID="Label0" runat="server" Text='<%# Eval("物料") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="200px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="规格" SortExpression="规格">
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("规格") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="180px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="单位" SortExpression="单位">
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("单位") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="单价" SortExpression="单价">
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Eval("单价") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="数量" SortExpression="数量">
                                    <ItemTemplate>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Eval("数量","{0:.00}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>

                            </Columns>
                          </asp:GridView>
		            </td>
	            </tr>
	            <tr>
		            <td>   


		            </td>
	            </tr>
            </table>
            

        </div>
    </div>

    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="计划ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>


<script>
    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "textbox") {
            textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
            textboxs[i].onfocus = function(e) { this.select(); };
        }
        else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
            textboxs[i].onfocus = function(e) { this.select(); };
        }

    }
    var rows = document.getElementsByTagName("tr");
    for (i = 0; i < rows.length; i++) {

        if (rows[i].className == "grid-row-normal") {
            rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
            rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
        }
    }
    var tds = document.getElementsByTagName("td");
    for (i = 0; i < tds.length; i++) {
        if (tds[i].className == "detailheader") {
            tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
        }
    }
</script>

    </form>
</body>
</html>
